<?php include "top.php"; ?>
<?php
		 $nid=make_safe($_GET["nid"]); 
		 if($nid==""){$nid=1;}
		 
		if($nid==1){$nidname="公司樣本";}
		 if($nid==2){$nidname="禮服";}
		 if($nid==3){$nidname="客戶";}
		 
		 
		?>
      <div id="top-3">
        <div id="m-text-1">
        <table border="0" cellpadding="0" cellspacing="0" class="tab-5">
   <tr>
     <td valign="top"><div class="tab-5-tit">主功能列表</div>
     <div class="m-text-2_btn"><a href="category.php?nid=<?php echo $nid;?>">作品分類管理</a></div>
     
     <div class="m-text-2_btn"><a href="target.php?nid=<?php echo $nid;?>" >標簽管理</a></div>
	 
     
    <div class="tab-5-tit">相簿管理</div>
      
	 
	 <?php
  $n=1;

  $sql="select * from product_type_big where nid='$nid' order by orderid  ";			
	$result=mysql_query($sql);
	while ($row=mysql_fetch_object($result)){
	?>
     <div class="m-text-2_btn"><a href="working.php?nid=<?php echo $nid;?>&BigClassName=<?php echo urlencode($row->BigClassName);?>"><?php echo $row->BigClassName;?></a></div>
     <?php }?>
	 
       </td>
   </tr>
   </table>
        </div>
		
		
       </td>
   </tr>
   </table>
        </div>
        <div id="m-text-2_banner">
          <ul>
            <li><a href="#">刪除</a></li>
            <li>/ </li>
            <li><a href="target_edit.php">修改</a></li>
            <li>/ </li>
            <li><a href="target_add.php">新增</a></li>
            <li>培豪標簽分類管理</li>
          </ul>
        </div><div id="m-text-2">
		
		
		
		
		
		
		<?php 
		$nid=make_safe($_GET["nid"]); 
   $action=make_safe($_GET["action"]);
 $content1=make_safe($_POST["content1"]);
 $content2=make_safe($_POST["content2"]);
 $content3=make_safe($_POST["content3"]);
 $content4=make_safe($_POST["content4"]);
 $content5=make_safe($_POST["content5"]);
 $addtime=$data3;
   
    if($action=="add"){
   
   if($content1!=""){  
   $sql="Insert Into target (nid,content,addtime) Values('$nid','$content1','$addtime')";
$result=mysql_query($sql);
}

  if($content2!=""){  
   $sql="Insert Into target (nid,content,addtime) Values('$nid','$content2','$addtime')";
$result=mysql_query($sql);
}

  if($content3!=""){  
   $sql="Insert Into target (nid,content,addtime) Values('$nid','$content3','$addtime')";
$result=mysql_query($sql);
}

  if($content4!=""){  
   $sql="Insert Into target (nid,content,addtime) Values('$nid','$content4','$addtime')";
$result=mysql_query($sql);
}

  if($content5!=""){  
   $sql="Insert Into target (nid,content,addtime) Values('$nid','$content5','$addtime')";
$result=mysql_query($sql);
}

   
echo "<script> alert('增加成功！');window.location.href='target.php?nid=$nid';</script>";

   
		
		}
		?>
		
		
		
		
		
		
		
		
		
		
		
	<form name="form1" action="?action=add&nid=<?php echo $nid;?>" method="post" enctype="multipart/form-data" target="_self">
		
          <table border="0" cellpadding="0" cellspacing="0" class="m-text-2-con">
            <tr>
              <td class="m-text-2-con1">&nbsp;</td>
              <td class="m-text-2-con2"><p>標簽名稱</p></td>
              <td class="m-text-2-con3">&nbsp;</td>
            </tr>
          </table>
          <table border="0" cellpadding="0" cellspacing="0" class="m-text-2-con">
            <tr>
              <td class="m-text-2-con1"><label for="checkbox"></label></td>
              <td class="m-text-2-con2"><label for="textfield12"></label>
                <input name="content1" type="text"  size="30" /></td>
              <td class="m-text-2-con3"><label for="textfield13"></label></td>
            </tr>
          </table>
          <table border="0" cellpadding="0" cellspacing="0" class="m-text-2-con">
            <tr>
              <td class="m-text-2-con1"><label for="checkbox"></label></td>
              <td class="m-text-2-con2"><label for="textfield14"></label>
                <input name="content2" type="text" size="30" /></td>
              <td class="m-text-2-con3"><label for="textfield15"></label></td>
            </tr>
          </table>
          <table border="0" cellpadding="0" cellspacing="0" class="m-text-2-con">
            <tr>
              <td class="m-text-2-con1"><label for="checkbox"></label></td>
              <td class="m-text-2-con2"><label for="textfield16"></label>
                <input name="content3" type="text"  size="30" /></td>
              <td class="m-text-2-con3"><label for="textfield17"></label></td>
            </tr>
          </table>
          <table border="0" cellpadding="0" cellspacing="0" class="m-text-2-con">
            <tr>
              <td class="m-text-2-con1"><label for="checkbox"></label></td>
              <td class="m-text-2-con2"><label for="textfield18"></label>
                <input name="content4" type="text"  size="30" /></td>
              <td class="m-text-2-con3"><label for="textfield19"></label></td>
            </tr>
          </table>
          <table border="0" cellpadding="0" cellspacing="0" class="m-text-2-con">
            <tr>
              <td class="m-text-2-con1"><label for="checkbox"></label></td>
              <td class="m-text-2-con2"><label for="textfield20"></label>
                <input name="content5" type="text"  size="30" /></td>
              <td class="m-text-2-con3"><label for="textfield21"></label></td>
            </tr>
          </table>
          <table border="0" cellpadding="0" cellspacing="0" class="m-text-2-con">
            <tr>
              <td class="m-text-2-con1"><label for="checkbox6"></label></td>
              <td class="m-text-2-con2"><input type="submit" name="button" id="button" value="新增" /></td>
              <td class="m-text-2-con3"><label for="textfield22"></label></td>
            </tr>
          </table>
		  
		  
		  </form>
		  
		  
		  
		
		  
		  
		  
		  
        </div>
      </div>
    </div>
  </div>
</div>
<div id="botton"><div id="copyright"><table border="0" cellpadding="0" cellspacing="0" class="copy">
  <tr>
    <td>© COPYRIGHTS 2010 INC. APARTMENT STUDIO All rights reserved.</td>
  </tr>
</table>
</div></div>
</body>
</html>